package com.etoak.stock.pojo.domin;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.util.Date;

/*
 * @autor:孙有泽
 * @data:2024/9/21
 * @desription :股票的涨跌信息
 * */
@ApiModel(description = "股票的涨跌信息")
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class StockUpdownDomain {

    @ExcelProperty(value = {"股票涨幅信息统计表","股票编码"},index = 1)
    @ApiModelProperty(value = "股票编码", position = 0)
    private String code;

    @ExcelProperty(value = {"股票涨幅信息统计表","股票名称"},index = 2)
    @ApiModelProperty(value = "股票名称", position = 1)
    private String name;

    @ExcelProperty(value = {"股票涨幅信息统计表","股票前收盘价"},index = 3)
    @ApiModelProperty(value = "股票前收盘价", position = 2)
    private BigDecimal preClosePrice;

    @ExcelProperty(value = {"股票涨幅信息统计表","当前价格"},index = 4)
    @ApiModelProperty(value = "当前价格", position = 3)
    private BigDecimal tradePrice;

    @ExcelProperty(value = {"股票涨幅信息统计表","涨跌额"},index = 5)
    @ApiModelProperty(value = "涨跌额", position = 4)
    private BigDecimal increase;

    @ExcelProperty(value = {"股票涨幅信息统计表","涨跌幅"},index = 6)
    @ApiModelProperty(value = "涨跌幅", position = 5)
    private BigDecimal upDown;

    @ExcelProperty(value = {"股票涨幅信息统计表","振幅"},index = 7)
    @ApiModelProperty(value = "振幅", position = 6)
    private BigDecimal amplitude;

    @ExcelProperty(value = {"股票涨幅信息统计表","交易量"},index = 8)
    @ApiModelProperty(value = "交易量", position = 7)
    private Long tradeAmt;

    @ExcelProperty(value = {"股票涨幅信息统计表","交易额"},index = 9)
    @ApiModelProperty(value = "交易额", position = 8)
    private BigDecimal tradeVol;

    /**
     * 日期
     */
    @ExcelProperty(value = {"股票涨幅信息统计表","股票前收盘价"},index = 10)
    @DateTimeFormat("yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "日期", position = 10)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    private Date curDate;


}
